Learn R Programming

pi0 (version 1.4-1)

geomean and harmean : Geometric mean and harmonic mean functions

Description

Geometric mean and harmonic mean functions

Usage

geomean(x)
harmean(x)

Arguments

x

numeric vector

Value

numeric scalar. For geomean, this is the geometric mean of x; for harmean, this is the harmonic mean of x.

Examples

Run this code
# NOT RUN {
geomean(10^(1:10)) #[1] 316227.8
harmean(10^(1:10)) #[1] 90
# }

Run the code above in your browser using DataLab